Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 1 - Appearance Manager Reference / Appearance Manager Functions
Coordinating Colors and Patterns With the Current Theme /


IsThemeInColor

NEW WITH THE APPEARANCE MANAGER

Checks to see whether the current theme would draw in color in the given environment.

pascal Boolean IsThemeInColor (
                     SInt16 inDepth,
                     Boolean inIsColorDevice);
inDepth
The bit depth (in pixels) of the current graphics port.
inIsColorDevice
A Boolean value. Set to true to indicate that you are drawing on a color device. Set to false for a monochrome device.
function result
Returns true if, given the depth and color device information, the theme would draw in color; returns false, if not.
DISCUSSION
The IsThemeInColor function is useful when you are drawing elements to match the current theme and need to determine whether or not the theme would be drawn in color or black and white. If the function returns true, you can draw in color; if it returns false, you should draw in black and white.

SPECIAL CONSIDERATIONS
Make sure Appearance Manager 1.0.1 is present before calling the IsThemeInColor function. See "Appearance Manager Gestalt Selector Constants" for details on how to determine if the Appearance Manager is present and what its version is, if so.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998